﻿<!DOCTYPE html>

<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8" />
    <title></title>
    <script>
        function updateTime() {
            var time = new Date().toLocaleTimeString();
            //注意，CSObj中是public void UpdateTime(string timeStr)，
            //要转换为小写
            cs.updateTime(time);
        }
        window.onload = function () {
            document.getElementById("btnUpdate_time").onclick=function () {
                setInterval(updateTime, 1000);
            };
            document.getElementById("btnShowCSharpWindow").onclick=function () {
                alert("js窗口");
                cs.showMsg("C#窗口");
            };
        };

    </script>
</head>
<body>
    <input type="button" id="btnShowCSharpWindow" value="弹C#框" />
    <input type="button" id="btnUpdate_time" value="更新时间" />
</body>
</html>
